#ifndef __AMBIENT_LIGHT_H__
#define __AMBIENT_LIGHT_H__
#include "SimpleLight.h"
#include "WString.h"

class AmbientLight : public SimpleLight{
private:
	char* montionTrigger_;
	long lightDelay_;
	long lastMontion_;
	enum State{
		READY,
		MONTION_EVENT,
		BUTTON_EVENT};
	State state_;
public:
	AmbientLight(IArduino& arduino, MessageRouter& router, const String& name, 	ILogger& logger, const String& buttonName,
	const String& lightCircuit,	const String& montionTrigger, long lightDelay = 60000);
	~AmbientLight();

	virtual void tick(long milliseconds);
	virtual bool onItem(const String& name, const String& value);
};

#endif